import Vue from 'vue'
// import Offset from '@/components/helper/offset'
// import Card from '@/components/material/card'

// Vue.component(Offset.name, Offset)
// Vue.component(Card.name, Card)
// Vue.component(Notification.name, Notification)

import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'

const requireComponent = require.context(
  '@/components/material', true, /\.vue$/,
)

requireComponent.keys().forEach(fileName => {
  const componentConfig = requireComponent(fileName)

  const componentName = upperFirst(
    camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, '')),
  )

  Vue.component(componentConfig.default.name || `Material${componentName}`, componentConfig.default || componentConfig)
})
